import { createApp } from 'vue'
import ArcoVue from '@arco-design/web-vue'
import ArcoVueIcon from '@arco-design/web-vue/es/icon'

import globalComponents from '@/components'
import App from './App.vue'
import router from './router'
import store from './store'
import i18n from '@/i18n'
import directives from './directives'

// 官方样式
// import '@arco-design/web-vue/dist/arco.css'
// MineAdmin-V2样式
import '@arco-themes/vue-mine-admin-v2/index.less'
import './style/skin.less'
import './style/index.css'
import './style/global.less'

import tool from '@/utils/tool'
import * as common from '@/utils/common'

const app = createApp(App)

app.use(ArcoVue, {})
.use(ArcoVueIcon)
.use(router)
.use(store)
.use(i18n)
.use(directives)
.use(globalComponents)

app.config.globalProperties.$tool = tool
app.config.globalProperties.$common = common
app.config.globalProperties.$title = import.meta.env.VITE_APP_TITLE
app.config.globalProperties.$url = import.meta.env.VITE_APP_BASE


// tool.capsule('MineAdmin', `v${packageJson.version} release`)
// console.log('MineAdmin 官网  https://www.mineadmin.com')
// console.log('MineAdmin 文档  https://doc.mineadmin.com')
// console.log('MineAdmin Github https://github.com/kanyxmo/MineAdmin')
// console.log('MineAdmin-Vue Github https://github.com/kanyxmo/MineAdmin-Vue')
// console.log('请不要吝啬您的 star，谢谢 ~ 🤩🤩🤩')

import * as Sentry from "@sentry/vue";
import { Integrations,BrowserTracing } from "@sentry/tracing";

// Sentry.init({
//     app,
//     dsn: "https://58ed3e139bfb4276a742d8679789c35e@sentry.eqship.com/2",
//     environment: import.meta.env.VITE_APP_ENV ?? 'production',
//     // integrations: [
//     // Sentry.browserTracingIntegration({ router }),
//     // Sentry.replayIntegration(),
//     // ],

//     // Set tracesSampleRate to 1.0 to capture 100%
//     // of transactions for tracing.
//     // We recommend adjusting this value in production
//     tracesSampleRate: 1.0,

//     // Set `tracePropagationTargets` to control for which URLs trace propagation should be enabled
//     // tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/],

//     // Capture Replay for 10% of all sessions,
//     // plus for 100% of sessions with an error
//     replaysSessionSampleRate: 0.1,
//     replaysOnErrorSampleRate: 1.0,
//     release: '0.0.1'
// });

app.mount('#app')